-
Notifications
You must be signed in to change notification settings - Fork 177
Refactor Makefile to use Makefile.common #324
Refactor Makefile to use Makefile.common #324
Conversation
|
@FUSAKLA you have 3 different PR's here :) I think best to make this one for the common makefile and open separate one for the data blocks. Regarding vendoring I think this was left out on purpose and with the new golang versioning proposal this becomes even less important. |
Yes, we don't vendor in libraries. |
|
Ok I'll split it up into 2 PR and omit the vendoring of libraries. |
|
I removed the vendoring and dependency management and left there only makefile refactoring as suggested. I also created second PR containing the |
|
Would it make sense to also enable the common tests in Travis so we know these work before merging? |
|
That sounds definitely reasonable but I have never worked with the Travis CI. I'll take a look at it and figure it out. Thank's for suggestion. |
|
This part is quite simple just look at the Prometheus .travis file |
|
I found several ways to achieve this and eventually decided to use env to expand matrix of tests Is this what you had in mind? Or should I add also makefile common for the tsdb root so that the static check, races, package usage checks etc are run also for the whole library? Maybe I misunderstood what did you mean by the common tests. |
|
At the end I added also Makefile.common for the root of tsdb so the tests run also for the tsdb library. For now it fails due to problems with static check I'll take a look at those problems asap so the build passes (I hope it will be just minor changes I'm newbie to Go) |
|
I meant just to add some common makefile targets. |
|
any code failures due to the new tests should be in a new PR to keep this as small as possible for an easy review. if you can't figure our the failures just open an issue and someone else or I can help with that part. |
cmd/tsdb/Makefile
Outdated
| TEST_DATA_DIR ?= "$(PROJECT_DIR)/testdata" | ||
| TEST_DATASET ?= "20kseries.json" | ||
| BENCH_DIR ?= "./benchout" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not 100% sure, but I think any env variables used in the Makefile.common should be set before
include ../../Makefile.common
|
@FUSAKLA still interested in finishing this? feel free to ping me on IRC if you get stuck anywhere. |
|
Hi, yeah sorry for the inactivity I'll try to get to this ASAP I started a new branch containing fixes for the CI fails on root of the TSDB project which will be introduced by this PR (there are license issues, code not belonging to any packages and so on) so I can send PR fixing the broken CI along with this. |
|
@FUSAKLA would you have time to revisit this? |
|
Sorry I completely forgot about this while working on other things, I'll get back to it. |
|
Thanks |
3938ce6 to
6800d72
Compare
|
@krasi-georgiev Once more sorry for the delay. I moved the variables above the include, Updated the Makefile.common with most recent version from the You can see for this PR CI fails due to the licence issues In the PR with license fixes it fails only on the staticcheck for which I don't have a fix yet. |
.travis.yml
Outdated
|
|
||
| script: | ||
| - go test -timeout 5m ./... | ||
| - make check_license style unused test staticcheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah lets add only the tests that don't fail and will add more after we fix the problems to keep the PR easy to review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make style unused test don't fail so lets add those and than will add check_license in another PR and staticcheck after that.
cmd/tsdb/Makefile
Outdated
| @@ -1,11 +1,49 @@ | |||
| # Copyright 2018 The Prometheus Authors | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say lets move this in the root folder and have a single Makefile
ecb8d92 to
eac6721
Compare
|
Ok all green, Now there is only one Makefile and failing checks are omitted and described why. |
|
Rushing it a bit again 😄
The rest lets do in the following PR. I think you need to do I will merge quickly so you can PR the benchmark improvements right away. |
3e8941f to
379d75a
Compare
5609d9b to
5115b11
Compare
|
I will re-trigger and will check it as well locally. |
|
I think it it because one of the tests doesn't revert the state can you revert the changes in the folder: |
1169354 to
d68a8c9
Compare
|
That's not what troubles me (i wanted to retriger the build once again but by mistake I added also the test files) but if you look at the last builds now there is one(go1.9) failed and the reason is |
|
yeah flaky. Will try to replicate locally. |
|
locally it works just fine Yeah reading more issues on this and seems to be quite often issue with Travis |
|
it hangs on me every time as well when running locally with:
so weird. |
|
Yeah but it just takes longer, I'm getting Reading this issue using Next option would be to test only go 1.10 |
d68a8c9 to
251f061
Compare
|
yeah for some reason the I will run bisect to check which commit causes this. |
|
just figured it |
|
yes, the issue was still the memory consumption. Are you ok with leaving the sudo enabled? |
251f061 to
8c0064c
Compare
|
Yeah I don't see any other way to solve it in this PR. Just put a comment why it is enabled and I will let @SuperQ and @simonpasquier also comment if this is ok to leave is for now as they are more familiar with Travis. We will also open an issue to remind us to check how to reduce the memory and duration of the |
|
Yep, it passed again now I just added the comment. You can check if it's sufficient. |
|
passes every time now! |
Signed-off-by: Martin Chodur <[email protected]>
Signed-off-by: Martin Chodur <[email protected]>
Signed-off-by: Martin Chodur <[email protected]>
8c0064c to
a6523fc
Compare
|
passed again after rebase, could you retry it few times to make sure it's ok? |
|
No problem with |
simonpasquier
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
@FUSAKLA Thanks. |
|
I was also looking also at running CI test for windows(due to recent issues in prometheus 2.4.0 release) but neither Travis or CircleCI offers this possibility unfortunately :/ But I found https://www.appveyor.com/ which offers free pricing for open-source projects and allows to run CI in windows environment. Maybe worth looking at? But that's for another PR :) Thanks for the review! |
Hi, after consulting with @gouthamve on KubeCon I wanted to add feature to decode data blocks for easier debugging to the cmd tsdb tool.
Unfortunately there was problem with benchmark test file path and dependencies so I decided to fix the Makefile and since I saw all the issues on unifying makefiles in most of the prometheus repos I assumed you will have to use it here also.
I also added dependencies using
govendorused in other prometheus repos (not sure if you would preferdepor other tools).The last thing is added
-h | --human-readableflag for thetsdb lscommand allowing user to display timestamps in human readable format.